home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / ams__l~1.zoo / man / scancode.man < prev    next >
Encoding:
Text File  |  1993-09-05  |  1.6 KB  |  68 lines

  1.                         ATARI MACHINE SPECIFIC LIBRARY
  2.  
  3.  
  4.  
  5. NAME
  6.      ScanCode - access to the Atari keyboard keys
  7.  
  8. SYNOPSIS
  9.      #include <ScanCode.h>
  10.  
  11.      bool KeyPressed()
  12.      int Key()
  13.      char AsciiKey()
  14.  
  15.      #define ...
  16.  
  17. DESCRIPTION
  18.      ScanCode allows the programmer to read input from the keyboard,
  19.      without echo, as either scancodes, or ASCII codes.
  20.  
  21. FUNCTIONS
  22.      KeyPressed() returns immediately.  It returns TRUE if a call to
  23.      Key would not wait, FALSE otherwise.
  24.  
  25.      Key() returns the scancode of the next key pressed.  If no key
  26.      is pressed, it waits.
  27.  
  28.      AsciiKey() returns the char of the next key pressed.  If no key
  29.      is pressed, it waits.
  30.  
  31. EXAMPLES
  32.      Do X until a key is pressed:
  33.          while (!KeyPressed()) X;
  34.  
  35.      Process according to an input key:
  36.          switch (Key()) {
  37.           case KEY_A: ...
  38.          break; case KEY_B: ...
  39.          break; case KEY_C: ...
  40.          }
  41.      or:
  42.          switch (AsciiKey()) {
  43.           case 'a': ...
  44.          break; case 'b': ...
  45.          break; case 'c': ...
  46.          }
  47.  
  48. SEE ALSO
  49.      stdio
  50.  
  51. BUGS
  52.      Keyboards in different countries have different mappings.
  53.  
  54. AUTHOR
  55.      Warwick Allison, 1992.
  56.      warwick@cs.uq.oz.au
  57.  
  58. COPYING
  59.      This functionality is part of the Atari Machine Specific Library,
  60.      and is Copyright 1992 by Warwick W. Allison.
  61.  
  62.      The Atari Machine Specific Library is free and protected under the
  63.      GNU Library General Public License.
  64.  
  65.      You are free to copy and modify these sources, provided you acknowledge
  66.      the origin by retaining this notice, and adhere to the conditions
  67.      described in the GNU LGPL.
  68.